<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ListCreator.ascx.cs" Inherits="SagaAdmin_Controls_ListCreator" %>
<table>
    <tr>
        <td>
            <asp:DropDownList runat="server" ID="listSagas" AutoPostBack="true"  />
            <asp:ObjectDataSource ID="Creators" runat="server" SelectMethod="GetCreatorsBySagaID"
                TypeName="HermesPortal.Core.UserServices" UpdateMethod="SetCreatorRoleForSaga"  >
                <SelectParameters>
                    <asp:ControlParameter ControlID="listSagas" Name="sagaID" PropertyName="SelectedValue"
                        Type="Int32" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:ControlParameter ControlID="CreatorList"  Name="creatorId" Type="Int32" />
                    <asp:ControlParameter ControlID="listSagas" Name="sagaId" Type="Int32" />
                    <asp:ControlParameter ControlID="listRoles" Name="sagaRoleName" Type="String" />
                </UpdateParameters>
            </asp:ObjectDataSource>
        </td>
    </tr>
    <tr>
        <td>
            <asp:GridView ID="CreatorList" runat="server" AutoGenerateColumns="False" DataKeyNames="CreatorID"
                DataSourceID="Creators" AllowPaging="true" PageSize="10"    >
                <Columns>
                    <asp:TemplateField  HeaderText="Change Role"  >
                    <ItemTemplate >
                     <asp:checkbox Id="chkSelectedChange" runat="server" />
                    </ItemTemplate> 
                        <ItemStyle Width="20px" />
                    </asp:TemplateField>
                       <asp:BoundField DataField="UserName" HeaderText="User Name" />
                       <asp:BoundField DataField="SagaRoleName" HeaderText="Role" />
                </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            <asp:DropDownList ID="listRoles" runat="server"></asp:DropDownList> <asp:Button ID="BtnSubmit" runat="server" Text="Submit" OnClick="OnClick_Update" style="" />
        </td>
    </tr>
</table>
` 